package com.infore.siteManagement.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.infore.siteManagement.entity.ProjectAndStation;

@Repository
public interface IProjectAndStationRepository extends JpaRepository<ProjectAndStation, String>,JpaSpecificationExecutor<ProjectAndStation>{

	List<ProjectAndStation> findByStationCodeIn(List<String> stationId);
	
	@Modifying
	@Transactional
	int deleteByStationCodeIn(List<String> stationCodes);
	
	/**通过因子删除中间表**/
	@Modifying
	@Transactional 
	int deleteByProjectCodeIn(List<String> projectCodes);
}
